import time

from Base import Base
from selenium.webdriver.common.by import By
class Page1(Base):
    # class="headerLogin"
    login_loc=(By.CLASS_NAME,'headerLogin')
    # name="name"
    username_loc=(By.ID,'userName')
    # id="password"
    password_loc=(By.ID,'password')
    # id="save"
    loginbtn_loc=(By.ID,'save')
    # class="binSub"
    accept_loc=(By.CLASS_NAME,'bindSub')
    def login(self):
        self.click(self.login_loc)
    def username(self):
        self.send_keys(self.username_loc,'17601535724')
    def password(self):
        self.send_keys(self.password_loc,'123456Aa')
    def loginbtn(self):
        self.click(self.loginbtn_loc)
    def accept(self):
        self.click(self.accept_loc)

    def jiuxian_louji1(self):
        self.open_url('https://www.jiuxian.com/')
        self.login()
        self.username()
        self.password()
        time.sleep(20)
        self.loginbtn()
        self.accept()
